package com.example.zwlyz.models;

import com.example.zwlyz.R;

import java.io.Serializable;

public class Product implements Serializable {
    private final int id;
    private String name;
    private double price;
    private String image;
    private String description;

    public Product(int id, String name, double price, String image, String description) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.image = image;
        this.description = description;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public double getPrice() {
        return price;
    }

    public String getImage() {
        return image;
    }

    public String getDescription() {
        return description;
    }

    public int getImageResource() {
        // 示例资源 ID，实际使用时替换为真实资源 ID
        // 这里返回0仅作为示例，实际开发中应该返回有效的资源ID
        return  R.mipmap.shangping;
    }
}